Skip to content

Conversation

@gandhi-21
Copy link
Contributor

@gandhi-21 gandhi-21 commented Mar 17, 2025

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Description

Followups from #5435:

  1. Updated Syntax highlighting to JS for all scripts
  2. Moved findAndClickButton to a common Utils.kt file in the tests directory

Add UI tests to validate the Create a README flow
Created a sample repository from scratch,
There are 5 test cases which validate the following

  1. /doc feature can be invoked, and user sees the option to CREATE or UPDATE an existing Readme
  2. User is prompted to confirm selected folder, change folder or cancel back to choosing CREATE or UPDATE Readme
  3. Make changes button brings the user to UPDATE with specific changes flow
  4. Accept button saves the README in the appropriate folder
  5. Reject button discards the changes

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@gandhi-21
Copy link
Contributor Author

/runUiTests

assertTrue(result.contains("Test Successful"))
assertFalse(result.contains("Error: Test Failed"))
if (result.contains("Error: Test Failed")) {
println("result: $result")
Copy link
Contributor

@vikshe vikshe Mar 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting why logger is not configured for those tests like it is configured for ui-tests/tst

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the console.log statements in the puppeteer scripts doesn't log and is diverted to the result variable, just adding a precautionary logging in case the test case failed, the test scripts have a lot more detailed logging as the test progresses

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please try looking at the detailed logs from the plugin to see if you can see these errors, then we can remove the print statements

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I looked at all logs for a failure and success test case and the puppeteer script logs were not present in any file, so keeping these in to ensure we can debug test failures. Could be something wrong with the driver if it's supposed to be logging all the logs from the puppeteer script execution?

@gandhi-21 gandhi-21 marked this pull request as ready for review March 17, 2025 19:34
@gandhi-21 gandhi-21 requested a review from a team as a code owner March 17, 2025 19:34
val testCase = TestCase(
IdeProductProvider.IC,
LocalProjectInfo(
Paths.get("tstData", "qdoc", "createFlow")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the difference other than the readme file between the 2 projects? Is there a way we can reuse the existing project?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a test case (in progress) that tests if we are able to generate a readme in a multi-root workspace so reusing doesn't help, we would still need atleast two different dummy repos for testing

assertTrue(result.contains("Test Successful"))
assertFalse(result.contains("Error: Test Failed"))
if (result.contains("Error: Test Failed")) {
println("result: $result")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please try looking at the detailed logs from the plugin to see if you can see these errors, then we can remove the print statements

@gandhi-21 gandhi-21 enabled auto-merge (squash) March 21, 2025 18:56
@gandhi-21
Copy link
Contributor Author

/runUiTests

@gandhi-21 gandhi-21 merged commit a75f49f into aws:main Mar 21, 2025
13 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants